package day03;

/**
 * 说明:
 *
 * @author:SuZhongHe
 * @date:2023/2/14
 **/
public class OperDemo {
    public static void main(String[] args) {
        //被使用时在前后不一样
        //a++的值为a;
        //++a的值为a+1;
        //  int a=6,b=7;
        //  a++;
        //  ++b;
        //  System.out.println(a);
        //  System.out.println(b);
        /*
        int a=6,b=6;
        int c=a++;//将a++的值赋值给c,同时a自增1;
                  //a+的值为5,所以c的值为5
        int d=++b;//
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);

         */
/*
        int a=5,b=10,c=5;
        boolean d=b>c;
        System.out.println(d);
        System.out.println(c<b);
        System.out.println(a>=c);
        System.out.println(a<=b);
        System.out.println(a==c);
        System.out.println(a!=c);
        System.out.println(a%2==0);
        System.out.println(a+c>b);
        System.out.println(a++>5);
        System.out.println(a++>5);


 */
        /*
        int a = 5, b = 10, c = 5;
        boolean b1 = b >= a && b < c;
        System.out.println(b1);
        System.out.println(b <= c && b > a);
        System.out.println(a == b && b < c);
        System.out.println(b != c && b > a);
        int age = 50;
        System.out.println(age >= 18 && age <= 60);
        int score=80;
        System.out.println(score>=0&&score<=100);

         */
        /*
        int a = 5, b = 10, c = 5;
        boolean d=!(a>b);
        System.out.println(d);+
        System.out.println(!(a>b));

         */
        /*
        //小面试题
        short s = 5;
        //s=s+5;//编译错误,需强转,在为s=(short)(s+5)
        s += 5;//相当于s=(short)(s+5)
        int a = 5;
        a += 10;
        System.out.println(a);
        a *= 2;
        System.out.println(a);
        a /= 6;
        System.out.println(a);
         */
        /*
        int age=(int) (Math.random()*100);
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我今年"+ age+"岁了");
        String name = "WKJ";
        System.out.println("大家好,我叫"+name);
        System.out.println("大家好,我叫"+name+",我今年"+age+"岁了");

         */
        /*
        //关系运算符
        int num =0;
        int flag= num>0?1:-1;
        System.out.println(flag);
        //找2个数的最大值
        int a=8,b=55;
        int max=a>b?a:b;
        System.out.println(max);

         */









    }
}
